package cn.kkcxy.blog.system.mapper.article;

import cn.kkcxy.blog.core.entity.article.ArticleTag;
import cn.kkcxy.blog.core.vo.client.archive.tag.ClientArticleTagsInfoVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author kk
* @description 针对表【article_tag】的数据库操作Mapper
* @createDate 2024-09-18 00:25:54
* @Entity cn.kkcxy.blog.core.entity.article.ArticleTag
*/
public interface ArticleTagMapper extends BaseMapper<ArticleTag> {

    /**
     * 获取文章标签列表数据
     */
    List<ClientArticleTagsInfoVO> selectTagList();

    /**
     * 获取这些标签的id集合
     */
    List<Long> selectArticleTagIdsByTagName(List<String> dtoTags);

    /**
     * 获得标签总数
     */
    @Select("select count(*) from article_tag where deleted = 0")
    Integer getTagCount();
}




